<?php
use \app\common\services\UrlService;
use \app\common\services\StaticService;
StaticService::includeAppJsStatic('/js/web/member/index.js',app\assets\MAsset::className());
?>
<?=Yii::$app->view->renderFile("@app/modules/web/views/common/tab_member.php",['current'=>'index'])?>
<div class="row">
    <div class="col-lg-12">
        <form class="form-inline wrap_search" action="">
            <div class="row  m-t p-w-m">
                <div class="form-group">
                    <select name="status" class="form-control inline">
                    <option value="-1">请选择状态</option>
                    <?php foreach($status_mapping as $k=>$v):?>
                        <option value="<?=$k?>"><?=$v?></option>
                    <?php endforeach;?>
            </div>
                <div class="form-group">
                    <div class="input-group">
                        <input type="text" name="mix_kw" placeholder="请输入关键字" class="form-control" value="">
                        <span class="input-group-btn">
                            <button type="submit" class="btn  btn-primary search">
                                <i class="fa fa-search"></i>搜索
                            </button>
                        </span>
                    </div>
                </div>
            </div>
            <hr/>
            <div class="row">
                <div class="col-lg-12">
                    <a class="btn btn-w-m btn-outline btn-primary pull-right" href="<?=UrlService::buildWebUrl('/member/set')?>">
                        <i class="fa fa-plus"></i>会员
                    </a>
                </div>
            </div>

        </form>
        <table class="table table-bordered m-t">
            <thead>
            <tr>
                <th>头像</th>
                <th>姓名</th>
                <th>手机</th>
                <th>性别</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <?php if($info):?>
                <?php foreach($info as $list):?>
                <tr>
                   <td><img alt="image" class="img-circle" src="/uploads/avatar/20170313/159419a875565b1afddd541fa34c9e65.jpg" style="width: 40px;height: 40px;"></td>
                   <td><?=$list['nickname']?></td>
                   <td><?=$list['mobile']?></td>
                   <td>未填写</td>
                   <td>正常</td>
                   <td>
                <a  href="<?=UrlService::buildWebUrl('/member/comment',['id'=>$list['id']])?>" class="member_comment" data="<?=$list['id']?>">
                    <i class="fa fa-eye fa-lg"></i>
                </a>
                <a  class="m-l" href="<?=UrlService::buildWebUrl('/member/set',['id'=>$list['id']])?>" data="">
                    <i class="fa fa-edit fa-lg"></i>
                </a>
                <?php if($list['status']==1):?>
                <a  class="m-l remove" href="javascript:void(0)" data="<?=$list['id']?>" >
                    <i class="fa fa-trash fa-lg" ></i>
                </a>
            <?php else:?>
            <a  class="m-l recover" href="javascript:void(0)" data="<?=$list['id']?>" >
                    <i class="fa fa-undo fa-lg" ></i>
            </a>
            <?php endif;?>
                </td>
            </tr>
        <?php endforeach;?>
    <?php endif;?>
            </tbody>
        </table>
<?=\Yii::$app->view->renderFile("@app/modules/web/views/common/page.php",[
        'page'=>$page,
        'url'=>"/member/index"
    ])
?>
    </div>
</div>

    </div>
</div>

